﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/MasterPage.master" AutoEventWireup="true" CodeFile="ListJoined.aspx.cs" Inherits="Manage_ListJoined" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script type="text/javascript">
        $(document).ready(function () {
            $('#SearchBar').width($('#Body table.List').width());
        });
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="body" Runat="Server">
    <asp:HiddenField ID="CurrentPage" runat="server" Value="1" />
    <div id="SearchBar">
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td><asp:LinkButton ID="Export" runat="server" Text="导出通讯录" SkinID="ExportButton" 
                        onclick="Export_Click"></asp:LinkButton></td>
                <td><asp:TextBox ID="SearchCondition" runat="server" SkinID="SearchBox" /><asp:HiddenField ID="SearchConditionHidden" runat="server" /></td>
                <td><asp:Button ID="Search" runat="server" Text="查询" 
                        onclick="Search_Click"/></td>
            </tr>
        </table>
    </div>
    <div style="clear: both">
        <asp:Repeater ID="TopicsView" runat="server">
            <HeaderTemplate>
                <table class="List" cellspacing="1">
                    <tr class="header">
                        <th style="width:100px">姓名</th>
                        <th style="width:80px">年龄</th>
                        <th style="width:100px">电话</th>
                        <th style="width:200px">所在乡镇</th>
                        <th style="width:250px">备注</th>
                    </tr>
            </HeaderTemplate>
            <AlternatingItemTemplate>
                <tr class="even">
                    <td align="center" style="width:100px"><%#Eval("Name") %></td>
                    <td align="center" style="width:80px"><%#Eval("Age") %></td>
                    <td align="center" style="width:100px"><%#Eval("Phone") %></td>
                    <td align="center" style="width:200px"><%#string.Format("{0} - {1} - {2}", Eval("Country"), Eval("Street"), Eval("Village")) %></td>
                    <td align="left" style="width:250px"><%#Convert.ToString(Eval("Memo")).Length>47?Convert.ToString(Eval("Memo")).Substring(0, 47)+"...":Eval("Memo") %></td>
                </tr>
            </AlternatingItemTemplate>
            <ItemTemplate>
                <tr class="odd">
                    <td align="center" style="width:100px"><%#Eval("Name") %></td>
                    <td align="center" style="width:80px"><%#Eval("Age") %></td>
                    <td align="center" style="width:100px"><%#Eval("Phone") %></td>
                    <td align="center" style="width:200px"><%#string.Format("{0} - {1} - {2}", Eval("Country"), Eval("Street"), Eval("Village")) %></td>
                    <td align="left" style="width:250px"><%#Convert.ToString(Eval("Memo")).Length>47?Convert.ToString(Eval("Memo")).Substring(0, 47)+"...":Eval("Memo") %></td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                <tr class="Footer">
                    <td colspan="5" align="center" valign="middle">
                        <table cellpadding="0" cellspacing="0">
                            <tr>
                                <td>共 <%=pds.DataSourceCount %> 条记录</td>
                                <td><asp:LinkButton ID="FirstButton" runat="server" SkinID="FirstButton" OnCommand="ChangePage" CommandArgument="F">&nbsp;</asp:LinkButton></td>
                                <td><asp:LinkButton ID="PreviousButton" runat="server" SkinID="PreviousButton" OnCommand="ChangePage" CommandArgument="P">&nbsp;</asp:LinkButton></td>
                                <td>第 <%=pds.CurrentPageIndex+1 %> 页 / 共 <%=pds.PageCount %> 页</td>
                                <td><asp:LinkButton ID="NextButton" runat="server" SkinID="NextButton" OnCommand="ChangePage" CommandArgument="N">&nbsp;</asp:LinkButton></td>
                                <td><asp:LinkButton ID="LastButton" runat="server" SkinID="LastButton" OnCommand="ChangePage" CommandArgument="L">&nbsp;</asp:LinkButton></td>
                                <td><asp:TextBox ID="GotoPage" runat="server" Width="30px"></asp:TextBox></td>
                                <td><asp:LinkButton ID="GotoButton" runat="server" SkinID="GotoButton" OnCommand="ChangePage" CommandArgument="G">&nbsp;</asp:LinkButton></td>
                            </tr>
                        </table>
                    </td>
                </tr>
                </table>
            </FooterTemplate>
        </asp:Repeater>
    </div>
</asp:Content>